!
!    time class
!
!-------------------------------------------------------------------------
!BOP
!
! !IROUTINE:  time_set
!                            
! 
! !INTERFACE:
!
      function time_set ( days, seconds )

! !USES:
!
!     none

! !INPUT PARAMETERS: 
!
      implicit NONE

      integer, intent(in) :: days           ! Days in interval
      integer, intent(in) :: seconds        ! Seconds in interval

! !OUTPUT PARAMETERS:
!
      type(time_t) :: time_set              ! Returned time

! !DESCRIPTION:
!
! Returns the time interval specified by the sum of {\tt days} and 
! {\tt seconds}.
!
! !REVISION HISTORY: 
!
!  Feb 8, 2001    B. Eaton    Specification.
!
!EOP
!-------------------------------------------------------------------------

!BOP
!
! !IROUTINE:  time_get() 
! 
! !INTERFACE:
!
      subroutine time_get ( time, days, seconds )

! !USES:
!
!     none

! !INPUT PARAMETERS: 
!
      implicit NONE

      type(time_t), intent(in) :: time      ! Input time

! !OUTPUT PARAMETERS:
!
      integer, intent(out) :: days          ! Days in interval
      integer, intent(out) :: seconds       ! Seconds in interval

! !DESCRIPTION:
!
! Returns the attributes of time in the form of {\tt days} 
! and {\tt seconds}.
!
! !REVISION HISTORY: 
!
!  Feb 8, 2001    B. Eaton    Specification.
!
!EOP
!-------------------------------------------------------------------------

!BOP
!
! !IROUTINE:  time_days()     
! 
! !INTERFACE:
!
      function time_days ( time )

! !USES:
!
!     none

! !INPUT PARAMETERS: 
!
      implicit NONE

      type(time_t), intent(in) :: time      ! Input time

! !OUTPUT PARAMETERS:
!
      real(r8) :: time_days                 ! Returned days

! !DESCRIPTION:
!
! Returns the length of {\tt time} in units of days.
!
! !REVISION HISTORY: 
!
!  Feb 8, 2001    B. Eaton    Specification.
!
!EOP
!-------------------------------------------------------------------------

!BOP
!
! !IROUTINE:  time_increment()
! 
! !INTERFACE:
!
      function time_increment ( time, days, seconds )

! !USES: 
!
!     none

! !INPUT PARAMETERS: 
!
      implicit NONE

      type(time_t), intent(in) :: time      ! Initial time
      integer, intent(in) :: days           ! Days in interval
      integer, intent(in) :: seconds        ! Seconds in interval

! !OUTPUT PARAMETERS:
!
      type(time_t) :: time_increment        ! Returned time

! !DESCRIPTION:
!
! Increments {\tt time} by {\tt days} and {\tt seconds} and returns the
! new time.
!
! !REVISION HISTORY: 
!
!  Feb 8, 2001    B. Eaton    Specification.
!
!EOP
!-------------------------------------------------------------------------

!BOP
!
! !IROUTINE:  time_decrement()
! 
! !INTERFACE:
!
      function time_decrement ( time, days, seconds )

! !USES: 
!
!     none

! !INPUT PARAMETERS: 
!
      implicit NONE


      type(time_t), intent(in) :: time      ! Initial time
      integer, intent(in) :: days           ! Days in interval
      integer, intent(in) :: seconds        ! Seconds in interval

! !OUTPUT PARAMETERS:
!
      type(time_t) :: time_decrement        ! Returned time

! !DESCRIPTION:
!
! Decrements {\tt time} by {\tt days} and {\tt seconds} and returns the
! new time.
!
! !REVISION HISTORY: 
!
!  Feb 8, 2001    B. Eaton    Specification.
!
!EOP
!-------------------------------------------------------------------------










